Conversation
…lle (Resolves #442) Each grammar mirrors the systemd C parser semantics rather than guessing from man-page prose: - config_parse_tasks_max: "infinity" | positive uint64 | 0..100(.NN)?% (parse_permyriad) - config_parse_unit_slice: single token, ".slice" suffix unless containing a specifier - config_parse_tbf_size (QDISC_KIND_TBF): IEC byte-size grammar, same shape as config_parse_fq_size - config_parse_nsec: existing TIME_VALUE grammar (parse_nsec accepts the same syntax as parse_sec) - config_parse_permille: 0..100(.x)?% (ASCII percent form of parse_permille) Reduces OptionValueTest missing-function count from 405 to 400 and adds 25 newly-validated key occurrences across [Service], [Mount], [Socket], [Swap], [TokenBucketFilter], and [CAN] sections. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements 5 new validators selected for high usage count + simple, verifiable C parser semantics. Each grammar matches the actual systemd C parser, not man-page prose — addressing the prior-cycle finding that AI-generated validators tend to look right but mismatch real semantics.
config_parse_tasks_max(0)src/core/load-fragment.c:3821config_parse_unit_slice(0)src/core/load-fragment.c:3635config_parse_tbf_size(QDISC_KIND_TBF)src/network/tc/tbf.c:111config_parse_nsec(0)src/basic/time-util.c:1358(parse_nsec)config_parse_permille(0)src/shared/conf-parser.c:1775→src/basic/percent-util.c:125OptionValueTestmissing-function count drops 405 → 400; found-key count rises 1719 → 1744 (25 newly-validated key occurrences across[Service],[Mount],[Socket],[Swap],[TokenBucketFilter],[CAN]).Resolves #442.
Stacking
Branches off
issue-440(the DHCP relay deprecation fix) — merge that one first or rebase onto242.xafter#441lands.Test plan
OptionValueTestpasses (400 < 411 allowed today)SemanticDataRepositoryTestpasses (all new validators backed by gperf entries)./gradlew test -x generateDataFromManPages, 1021 tests)Notes
tasks_maxandpermille; the Unicode‰/‱suffixes accepted by the C parser are vanishingly rare in real unit files. If users hit a false positive, easy follow-up.unit_sliceaccepts.slice-terminated names or anything with a%specifier (which expands at runtime to potentially anything). Whitespace-separated lists are not accepted, matching the C parser.🤖 Generated with Claude Code